import {NgModule} from '@angular/core';
import {RouterModule, Routes} from '@angular/router';
import {MyDocumentComponent} from "./my-document/my-document.component";
import {EditDocumentComponent} from "./edit-document/edit-document.component";
import {AllDocumentComponent} from "./all-document/all-document.component";
import {DocumentPreviewComponent} from "./document-preview/document-preview.component";

const routes: Routes = [{
  path: 'mine',
  component: MyDocumentComponent,
  data: {
    keep: true
  }
}, {
  path: 'mine/edit',
  component: EditDocumentComponent
}, {
  path: 'query',
  component: AllDocumentComponent
}, {
  path: 'query/preview',
  component: DocumentPreviewComponent
}];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class DocumentRoutingModule {
}
